package com.bobo.web.provider.filter;

import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

/**
 * author v
 * 20181019
 */
public class UnFilterPathList {
    private static final Map<String,String> NEED_PV_PATH =new ImmutableMap.Builder<String, String>()
            .put("/basketball/api/activity/list","YES")
            .put("/basketball/api/activity/getVoteUserInfo","YES")
            .build();

    /**
     * 判断是否需要记录访问量
     * @param path
     * @return
     */
    public static Boolean isNeedPv(String path){
        String type = NEED_PV_PATH.get(path);
        if(StringUtils.isNotEmpty(type)){
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }

}
